/**
 * 
 */
package net.sf.rose.web.spring.servlet.handler;

import java.io.UnsupportedEncodingException;

import org.springframework.web.context.support.WebApplicationObjectSupport;
import org.springframework.web.servlet.mvc.Controller;

/**
 * @author fengjian
 * 
 */
public abstract class URLHandler extends WebApplicationObjectSupport implements
		Controller {

	private String viewName = null;

	protected String datePatten = "MM-dd-yyyy HH:mm";

	/**
	 * 
	 */
	public void setViewName(String viewName) {
		this.viewName = viewName.substring(1, viewName.length() - 4);
		try {
			this.viewName = java.net.URLDecoder.decode(this.viewName.toString(), "UTF-8");
		} catch (UnsupportedEncodingException e) {
			throw new RuntimeException(e);
		}
	}

	/**
	 * 
	 */
	public String getViewName() {
		return viewName;
	}
	
	
}
